package com.spi.soconversion.base.definition;

import com.spi.soconversion.util.SOCConstants;
import com.spi.soconversion.util.SOCUtility;
import com.spi.soconversion.util.XMLAttributeConstants;
import com.spi.soconversion.util.XMLTagConstants;

public class SOCOrderExtn {
	
	private String extnIsDepositAmountCollected=SOCConstants.EMPTY_STRING;
	private String extnDepositAmount=SOCConstants.ZERO;
	private String extnHBCAssociateID;
	private String extnAmtCollected;
	
	
	public String getExtnDepositAmount() {
		return extnDepositAmount;
	}
	
	public String getExtnIsDepositAmountCollected() {
		return extnIsDepositAmountCollected;
	}
	
	public void setExtnHBCAssociateID(String extnHBCAssociateID) {
		this.extnHBCAssociateID = extnHBCAssociateID;
	}
	
	public String getExtnHBCAssociateID() {
		return  SOCUtility.checkNull(extnHBCAssociateID);
	}
	
	public void setExtnAmtCollected(String extnAmtCollected) {
		this.extnAmtCollected = extnAmtCollected;
	}
		
	public String getExtnAmtCollected() {
		return  SOCUtility.checkNull(extnAmtCollected);
	}
	
	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder();

		sb.append(XMLTagConstants.START_TAG_EXTN);
		sb.append(SOCConstants.BLANK_STRING);

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_DEPOSIT_IS_COLLECTED,getExtnIsDepositAmountCollected()));
		sb.append(SOCConstants.BLANK_STRING);

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_DEPOSIT_AMT,getExtnDepositAmount()));
		sb.append(SOCConstants.BLANK_STRING);		

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_HBC_ASSOCIATE_ID, getExtnHBCAssociateID()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_AMT_COLLECTED, getExtnAmtCollected()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCConstants.CLOSING_XML_TAG);
		sb.append(SOCConstants.NEW_LINE);
		sb.append(XMLTagConstants.END_TAG_EXTN);

		return sb.toString();
	}
}
